home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 31 / Amiga Format CD31 (1998-09-02)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1998-10].iso / -seriously_amiga- / hardware / transadf / source / version.c < prev    next >
C/C++ Source or Header  |  1998-07-20  |  4KB  |  102 lines

  1. /* version.c - Usage and version information
  2. ** Copyright (C) 1997,1998 Karl J. Ots
  3. ** 
  4. ** This program is free software; you can redistribute it and/or modify
  5. ** it under the terms of the GNU General Public License as published by
  6. ** the Free Software Foundation; either version 2 of the License, or
  7. ** (at your option) any later version.
  8. ** 
  9. ** This program is distributed in the hope that it will be useful,
  10. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. ** GNU General Public License for more details.
  13. ** 
  14. ** You should have received a copy of the GNU General Public License
  15. ** along with this program; if not, write to the Free Software
  16. ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  17. */
  18.  
  19. /*-------------------------------*/
  20. /* Version information and usage */
  21. /*-------------------------------*/
  22.  
  23. /* COMPILE_LITE takes precedence over COMPILE_RT */
  24. #ifdef COMPILE_LITE
  25. #  ifdef COMPILE_RT
  26. #    undef COMPILE_RT
  27. #  endif /* COMPILE_RT */
  28. #endif /* COMPILE_LITE */
  29.  
  30. #include <exec/types.h>
  31. #include <dos/dos.h>
  32. #include <clib/dos_protos.h>
  33.  
  34. #include "version.h"
  35. #include "main.h"
  36. #include "args.h"
  37. #include "zlib.h"
  38.  
  39.  
  40. /* Any procedure that needs to access these macros should be kept here.  */
  41. /* This prevents any module from needing to be recompiled just to change */
  42. /* the program's name, version or date.                                  */
  43.  
  44. #ifdef COMPILE_LITE
  45. #  define PROG_NAME  "TransADF-Lite"
  46. #else /* ifndef COMPILE_LITE */
  47. #  ifdef COMPILE_RT
  48. #    define PROG_NAME  "TransADF-RT"
  49. #  else /* ifndef COMPILE_RT ( && ifndef COMPILE_LITE) */
  50. #    define PROG_NAME  "TransADF"
  51. #  endif /* COMPILE_RT */
  52. #endif /* COMPILE_LITE */
  53.  
  54. #define PROG_VER   "3.100.27"
  55. #define PROG_DATE  "13th July 1998"
  56.  
  57. const char VerString[] = "$VER: "PROG_NAME" "PROG_VER" ("PROG_DATE")\r\n\0";
  58. #ifndef COMPILE_LITE
  59. const char ZipComment[] = "Created with "PROG_NAME" v"PROG_VER".\n\
  60. "PROG_NAME" Copyright (c) Karl J. Ots, "PROG_DATE".";
  61. #endif /* COMPILE_LITE */
  62.  
  63.  
  64. /*
  65. ** Output program usage to StdErr and call cleanExit()
  66. */
  67. void outputUsage (void)
  68. {
  69.   FPuts (StdErr,
  70.         "\033[1m"PROG_NAME" v"PROG_VER" © "PROG_DATE" Karl J. Ots\033[0m\n");
  71. #ifndef COMPILE_LITE
  72.   FPrintf (StdErr, " Incorperating ZLib %s", zlibVersion());
  73. #  ifdef COMPILE_RT
  74.   FPrintf (StdErr, ", using z.library %ld.%ld", ZBase->lib_Version,
  75.                                                 ZBase->lib_Revision);
  76. #  endif /* COMPILE_RT */
  77.   FPuts (StdErr, "\n");
  78. #endif /* COMPILE_LITE */
  79.   
  80.   FPrintf (StdErr, "\nUsage:\t%s\n\n", TA_Template);
  81.   
  82.   FPuts (StdErr, "\tDRIVE\tDisk drive to operate on (Required).\n");
  83.   FPuts (StdErr, "\tFILE\tName of Amiga Disk File or Archive (Required).\n");
  84.   FPuts (StdErr, "\tSTART\tTrack to begin operation at (Default 0).\n");
  85.   FPuts (StdErr, "\tEND\tTrack to stop operation at (Default 79).\n");
  86.   FPuts (StdErr, "\tWRITE\tWrite from FILE to DRIVE.\n");
  87.   FPuts (StdErr, "\tVERIFY\tVerify that data is written to the disk correctly.\n");
  88. #ifdef COMPILE_LITE
  89.   FPuts (StdErr, "\tZLIB, GZIP, PKZIP, NAME, LEVEL, ADD\n");
  90.   FPuts (StdErr, "\t\tDisabled in Lite version.\n");
  91. #else /* ifndef COMPILE_LITE */
  92.   FPuts (StdErr, "\tZLIB\tCompress disk into a ZLib file.\n");
  93.   FPuts (StdErr, "\tGZIP\tCompress disk into a GZip file.\n");
  94.   FPuts (StdErr, "\tPKZIP\tCompress disk into a PKZip file.\n");
  95.   FPuts (StdErr, "\tNAME\tName to store in file or file to dearchive.\n");
  96.   FPuts (StdErr, "\tLEVEL\tCompression level, 1 - 9 (Default 6).\n");
  97.   FPuts (StdErr, "\tADD\tAdd disk to PKZip archive.\n");
  98. #endif /* COMPILE_LITE */
  99.   FPuts (StdErr, "\n");
  100.   cleanExit (RETURN_FAIL, ERROR_REQUIRED_ARG_MISSING);
  101. }
  102.